		function login(){
			var username=document.getElementById("userName").value;
			var userpwd=document.getElementById("userpwd").value;
			var repwd=document.getElementById("repwd").value;
			var email=document.getElementById("email").value;
			var hname=document.getElementById("hname").value;
			var hemail=document.getElementById("hemail").value;
			
			if(username=="")
				document.getElementById("errName").innerHTML='*';
			else 
				document.getElementById("errName").innerHTML='';
			if(userpwd=="")
				document.getElementById("pwd").innerHTML='*';
			else 
				document.getElementById("pwd").innerHTML='';
			if(repwd=="")
				document.getElementById("errPwd").innerHTML='*';
			else 
				document.getElementById("errPwd").innerHTML='';
			if(email=="")
				document.getElementById("errEmail").innerHTML='*';
			else 
				document.getElementById("errEmail").innerHTML='';
			if(userpwd!=repwd)
				document.getElementById("errPwd").innerHTML='两次密码不一致!';
			else 
				document.getElementById("error").innerHTML='';
			if(hemail=="no")
				document.getElementById("errEmail").innerHTML='邮箱已存在或输入错误!';
			else 
				document.getElementById("errEmail").innerHTML='';
			if(hname=="no")
				document.getElementById("errName").innerHTML='用户名已存在!';
			else 
				document.getElementById("errName").innerHTML='';
			if(username!="" && userpwd!="" && repwd!="" && email!="" && userpwd==repwd && hemail=="yes" && hname=="yes")
			{	
				document.useradd.submit();
			}
			
		}